/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author owtee
 */
@Entity
@Table(name = "message")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Message.findAll", query = "SELECT m FROM Message m"),
    @NamedQuery(name = "Message.findByMesId", query = "SELECT m FROM Message m WHERE m.mesId = :mesId"),
    @NamedQuery(name = "Message.findByMesType", query = "SELECT m FROM Message m WHERE m.mesType = :mesType"),
    @NamedQuery(name = "Message.findByMesDetail", query = "SELECT m FROM Message m WHERE m.mesDetail = :mesDetail"),
    @NamedQuery(name = "Message.findByCreateUser", query = "SELECT m FROM Message m WHERE m.createUser = :createUser"),
    @NamedQuery(name = "Message.findByCreateDate", query = "SELECT m FROM Message m WHERE m.createDate = :createDate"),
    @NamedQuery(name = "Message.findByModifyUser", query = "SELECT m FROM Message m WHERE m.modifyUser = :modifyUser"),
    @NamedQuery(name = "Message.findByModifyDate", query = "SELECT m FROM Message m WHERE m.modifyDate = :modifyDate")})
public class Message implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 5)
    @Column(name = "Mes_Id")
    private String mesId;
    @Size(max = 20)
    @Column(name = "Mes_Type")
    private String mesType;
    @Size(max = 50)
    @Column(name = "Mes_Detail")
    private String mesDetail;
    @Size(max = 10)
    @Column(name = "Create_User")
    private String createUser;
    @Column(name = "Create_Date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createDate;
    @Size(max = 10)
    @Column(name = "Modify_User")
    private String modifyUser;
    @Column(name = "Modify_Date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date modifyDate;

    public Message() {
    }

    public Message(String mesId) {
        this.mesId = mesId;
    }

    public String getMesId() {
        return mesId;
    }

    public void setMesId(String mesId) {
        this.mesId = mesId;
    }

    public String getMesType() {
        return mesType;
    }

    public void setMesType(String mesType) {
        this.mesType = mesType;
    }

    public String getMesDetail() {
        return mesDetail;
    }

    public void setMesDetail(String mesDetail) {
        this.mesDetail = mesDetail;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getModifyUser() {
        return modifyUser;
    }

    public void setModifyUser(String modifyUser) {
        this.modifyUser = modifyUser;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (mesId != null ? mesId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Message)) {
            return false;
        }
        Message other = (Message) object;
        if ((this.mesId == null && other.mesId != null) || (this.mesId != null && !this.mesId.equals(other.mesId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.Message[ mesId=" + mesId + " ]";
    }
    
}
